import { createStore } from 'vuex'
import mutations from './mutations'
import actions from './actions'

const state = {
  user:{
    isLogin:window.localStorage.getItem('token')?true:false,
    name:window.localStorage.getItem('username')?window.localStorage.getItem('username'):'' 
  },
  CartCount:window.localStorage.getItem('count') || 0
}



export default createStore({
  state,
  getters: {
  },
  mutations,
  actions,
  modules: {
  }
})


